home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
rjs.lha
/
RJS
/
NDR
/
tests
/
Date.h
next >
Wrap
C/C++ Source or Header
|
1991-06-14
|
429b
|
21 lines
#include <iostream.h>
#include "RJS/NDR.h"
class Date : public XNDR {
friend ostream &operator<<(ostream &os, Date &dt) {
os << dt.m << "/" << dt.d << "/" << dt.y ;
return os;
}
public:
Date() : y(0),m(0),d(0) {}
Date(int m1, int d1, int y1) : y(y1),m(m1),d(d1) {}
virtual void to_external(NDR_send &ndr) {
ndr << y << m << d;
}
virtual void to_internal(NDR_receive &ndr) {
ndr >> y >> m >> d;
}
int y,m,d;
};